home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 1 #3
/
Commodore_Disk_User_Vol.1_3_1988_-.d64
/
multifill demo
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
111 lines
10 ifpeek(828)<>24thenload"multifill",8,1
20 poke53281,14:poke53280,14
30 print"[147] colour fill demo[154]" "
40 k[178]14:w[178]40:h[178]24:lb[178]40:hb[178]4:[141]1040
50 k[178]160:w[178]40:h[178]24:lb[178]40:hb[178]4:a$[178]"c":[141]1040:a$[178]""
60 [129]a[178]0[164]16
70 k[178]a:w[178]16:h[178]1:hb[178][181](1517[173]256):lb[178]1517[171]hb[172]256
71 [129]b[178]0[164]10
72 w[178]w[170]2:h[178]h[170]2:lb[178]lb[171]41:[139]lb[179]0[167]hb[178]hb[171]1:lb[178]lb[170]255
73 [141]1040:[130]b,a
201 c[178]2000:[141]1030
210 [151]53281,0:[153]"load"
220 [153]"sysuse this utility to fill blocks of colour - sys 828"
221 c[178]1000:[141]1030
230 k[178]160:w[178]10:h[178]5:lb[178]245:hb[178]4:a$[178]"c":[141]1040
240 [129]a[178]1[164]20
250 k[178]5[170]a:w[178]10:h[178]5:lb[178]245:hb[178]4:a$[178]"":[141]1040
260 [129]b[178]0[164]200:[130]b,a
270 [153]"or to fill blocks with characters"
280 [153]" - sys 835
290 fora=20to0step-1
300 k=83+a:w=10:h=5:lb=20:hb=7:a$="c":gosub1040
310 forb=0to200:nextb,a
320 forb=0to400:next
330 print"[147]":poke53270,peek(53270)or16
340 print"[156] it also works in multicolour but you"
350 print" have to design your own characters
360 [151]53282,14:[151]53283,15
370 k[178]0:w[178]40:h[178]7:lb[178]144:hb[178]5:a$[178]"":[141]1040
380 [129]a[178]0[164]255:[151]1424[170]a,a:[130]
390 k[178]6:w[178]40:h[178]7:lb[178]144:hb[178]5:[141]1040
400 [129]a[178]0[164]23
410 c[178](5[170]a)[175]6[176]1
420 k[178]c:w[178]40:h[178]10:lb[178]0:hb[178]4:[141]1040
430 k[178]a[176]8:w[178]20:h[178]7:lb[178]154:hb[178]5:[141]1040
440 [129]b[178]0[164]300:[130]b,a
450 [129]b[178]0[164]500:[130]
460 [151]53270,[194](53270)[175]239
470 [129]b[178]0[164]300:[130]:[151]53281,6:[151]53280,6
480 [153]"loadsysyou can make shapes using smaller blocks"
490 k[178]160:w[178]40:h[178]21:lb[178]160:hb[178]4:a$[178]"c":[141]1040
500 k[178]7:w[178]40:h[178]21:lb[178]160:hb[178]4:a$[178]"":[141]1040
510 [129]b[178]0[164]2000:[130]
680 [135]k,w,h,lb,hb:[141]1040:[139]hb[179][177]6[167]680
681 [131]10,6,4,30,5
682 [131]2,3,2,71,5
683 [131]10,5,3,115,5
684 [131]7,1,1,156,5
685 [131]0,1,11,235,5
686 [131]8,20,11,236,5
687 [131]7,8,7,236,5
688 [131]7,5,7,251,5
689 [131]7,2,2,4,7
690 [131]7,2,1,6,7
691 [131]7,2,1,20,7
692 [131]7,2,2,22,7
693 [131]7,1,2,244,5
694 [131]7,1,1,245,5
695 [131]7,1,1,249,5
696 [131]7,1,2,250,5
697 [131]5,3,4,110,6
699 [129]b[178]0[164]5000:[130]
700 [153]"load":[151]53280,6:[151]53281,6
710 [153]"contfor your convenience the poke locations"
720 [153]"for both screen characters and screen"
730 [153]"colours use the same memory grid."
740 [153]"for example:"
750 [153]"if a character block is placed at the"
760 [153]"screen location 1717:";:c[178]3000:[141]1030
770 [129]a[178]1[164]40:k[178]32:w[178]10:h[178]5:hb[178][181](1717[173]256):lb[178]1717[171]256[172]hb:a$[178]"c":[141]1040
780 k[178]83:[141]1040:[130]
781 c[178]3000:[141]1030
790 [153]"cmd. the colour is alsopoked to 1717:":c[178]2000:[141]1030
800 a$[178]"":[129]a[178]1[164]20:c[178]100
801 k[178]7:[141]1040
802 [141]1030
803 k[178]8:[141]1040
804 [141]1030
805 [130]
810 [153]"press any key";
811 k[178]10:w[178]13:h[178]1:hb[178][181](1996[173]256):lb[178]1996[171]256[172]hb:[141]1040
812 [161]b$:[139]b$[179][177]""[167]830
813 k[178]0:[141]1040:[137]811
830 [153]"load":[151]53280,0:[151]53281,0
840 [153]"systo use the utility set up the parameterslike this:
850 c=3000:gosub1030
860 print"[150]poke 2 [154]with a colour or screen"
870 print" character value"
880 gosub1030
890 print"[150]poke 250 [154]with the block width"
900 gosub1030
910 print"[150]poke 251 [154]with the block height"
920 gosub1030
930 print"[150]poke 252 [154]with the low byte of the top"
940 print" left square of the block"
950 gosub1030
960 print"[150]poke 253 [154]with the high byte of the top"
970 print" left square of the block"
980 gosub1030
990 print"[150]sys 828 [154]for c[153]o[154]l[155]o[158]ur[153]s"
1000 gosub1030
1010 print"[150]sys 835 [154]for characters[145]"
1011 print"press any key";
1012 k=7:w=13:h=1:hb=int(1996/256):lb=1996-256*hb:gosub1040
1013 getb$:ifb$<>""then1020
1014 k=0:gosub1040:goto1012
1020 k=32:a$="c":gosub1040:print"[145][145][145]":end
1030 forb=0toc:next:return
1040 poke2,k:poke250,w:poke251,h:poke252,lb:poke253,hb:ifa$="c"thensys835:return
1050 sys828:return